package com.lemon.components.common.order;

import org.springframework.util.Assert;

public abstract class ValidateOrderBase {
	protected void validateHasText(String validateField, String fieldDes) {
		Assert.hasText(validateField, fieldDes + "不能为空!");
	}
	
	protected void validateHasZore(long vlaue, String fieldDes) {
		Assert.isTrue(vlaue > 0, fieldDes + "不能为空!");
	}
	
	protected void validateNotNull(Object validateField, String fieldDes) {
		Assert.notNull(validateField, fieldDes + "不能为空!");
	}
	
	protected void validateGreaterThan(Number validateField, String fieldDes) {
		Assert.isTrue(validateField.doubleValue() > 0, fieldDes + "必须大于零!");
	}
	
	protected void validateGreaterThanEqualZero(Number validateField, String fieldDes) {
		Assert.isTrue(validateField.doubleValue() >= 0, fieldDes + "必须大于等于零!");
	}
	public abstract void check();
}
